import matplotlib.pyplot as plt
import numpy as np
from math import log

fig = plt.figure()
#x = np.array([log(44), log(64), log(186), log(394), log(526), log(930)])
x = np.array([log(0.25), log(0.2), log(0.1), log(0.08), log(0.07), log(0.05)])
y = np.array([log(0.00671632), log(0.00459713), log(0.00169804),
    log(0.000764285), log(0.0005646), log(0.000304804)])
polyfit = np.polyfit(x, y, 1)
yvals = np.polyval(polyfit, x)

plt.plot(x, y, '*', label='original value')
plt.plot(x, yvals, 'r', label=np.poly1d(polyfit))
plt.xlabel('x axis')
plt.ylabel('y axis')
plt.legend()
plt.show()

